<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增代付订单')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-withdraw-add">
        <input id="withdrawChildCode" name="withdrawChildCode" hidden="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">代付金额：</label>
            <div class="col-sm-8">
                <input name="withdrawAmount" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人ifsc：</label>
            <div class="col-sm-8">
                <input name="receiveIfsc" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人银行名字：</label>
            <div class="col-sm-8">
                <input name="receiveBankname" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人名称：</label>
            <div class="col-sm-8">
                <input name="receiveName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人银行账号：</label>
            <div class="col-sm-8">
                <input name="receiveBankaccount" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人手机号：</label>
            <div class="col-sm-8">
                <input name="receiveMobile" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">收款人邮箱：</label>
            <div class="col-sm-8">
                <input name="receiveEmail" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">支付密码：</label>
            <div class="col-sm-8">
                <input name="payPassword" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">验证码：</label>
            <div class="col-sm-8">
                <input name="googlePassword" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/withdraw"
    $("#form-withdraw-add").validate({
        focusCleanup: true
    });

    $(function() {
        $("#withdrawChildCode").val(random_No());
    });

    function random_No(j) {
        var random_no = "";
        for (var i = 0; i < j; i++) //j位随机数，用以加在时间戳后面。
        {
            random_no += Math.floor(Math.random() * 10);
        }
        random_no = new Date().getTime() + random_no;
        return random_no;
    };

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-withdraw-add').serialize());
            $("#withdrawChildCode").val(random_No());
        }
    }


</script>
</body>
</html>